<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org">
  <th:block th:fragment="blogger">
    <section class="joe_aside__item author">
      <img
        class="image lazyload"
        width="100%"
        height="120"
        th:data-src="${theme.config.blogger.author_bg} ?: @{/assets/img/author_bg.jpg}"
        src=""
        alt="博主栏壁纸"
      >
      <div class="user">
        <div
          class="avatar_wrapper"
          th:classappend="${theme.config.blogger.avatar_type == 'circle' ? 'circle' : 'round'}"
        >
          <img
            class="avatar lazyload"
            th:data-src="${theme.config.blogger.avatar ?: theme.config.blogger.default_avatar}"
            th:src="${theme.config.blogger.lazyload_avatar}"
            alt="博主头像"
          />
          <th:block th:if="${theme.config.blogger.avatar_frame != '0'}">
            <img
              th:class="'avatar_frame '+${theme.config.blogger.avatar_frame}"
              th:src="@{/assets/frame/}+'/'+${theme.config.blogger.avatar_frame}+'.png'"
              alt="挂架"
            />
          </th:block>
          <th:block th:if="${theme.config.blogger.avatar_widget != '0'}">
            <img
              th:class="'avatar_widget '+${theme.config.blogger.avatar_widget}"
              th:src="@{/assets/widget/}+'/'+${theme.config.blogger.avatar_widget}+'.gif'"
              alt="相框"
            />
          </th:block>
        </div>
        <a class="link" th:href="${site.url}" target="_blank" rel="noopener noreferrer nofollow">
          [[${theme.config.blogger.nickname ?: site.title}]]
        </a>
        <th:block th:if="${theme.config.blogger.motto != ''}">
          <p class="motto joe_motto">[[${theme.config.blogger.motto}]]</p>
        </th:block>
        <th:block th:if="${theme.config.blogger.motto == ''}">
          <th:block th:if="${theme.config.blogger.enable_day_words}">
            <img
              class="motto_day_words"
              height="14"
              src="https://v2.jinrishici.com/one.svg?font-size=146&spacing=2&color=grey"
              alt="每日一句"
            />
          </th:block>
        </th:block>
      </div>
      <div class="count" th:with="stats = ${siteStatsFinder.getStats()}">
        <!--搭配-->
        <th:block th:if="${theme.config.blogger.overview_type == 'A'}">
          <div class="item" th:title="'累计分类数 '+${stats.category}">
            <span class="num">[[${stats.category}]]</span>
            <span>分类数</span>
          </div>
          <th:block th:with="tags = ${tagFinder.listAll()}">
            <div th:with="tagNum = ${#lists.size(tags)}" class="item" th:title="'累计标签数 '+${tagNum}">
              <span class="num">[[${tagNum}]]</span>
              <span>标签数</span>
            </div>
          </th:block>
          <div class="item" th:title="'累计文章数 '+${stats.post}">
            <span class="num">[[${stats.post}]]</span>
            <span>文章数</span>
          </div>
        </th:block>
        <th:block th:if="${theme.config.blogger.overview_type == 'B'}">
          <div class="item" th:title="'累计分类数 '+${stats.category}">
            <span class="num">[[${stats.category}]]</span>
            <span>分类数</span>
          </div>
          <th:block th:with="tags = ${tagFinder.listAll()}">
            <div th:with="tagNum = ${#lists.size(tags)}" class="item" th:title="'累计标签数 '+${tagNum}">
              <span class="num">[[${tagNum}]]</span>
              <span>标签数</span>
            </div>
          </th:block>
          <div class="item" th:title="'累计评论数 '+${stats.comment}">
            <span class="num">[[${stats.comment}]]</span>
            <span>评论数</span>
          </div>
        </th:block>
        <th:block th:if="${theme.config.blogger.overview_type == 'C'}">
          <div class="item" th:title="'累计分类数 '+${stats.category}">
            <span class="num">[[${stats.category}]]</span>
            <span>分类数</span>
          </div>
          <div class="item" th:title="'累计文章数 '+${stats.post}">
            <span class="num">[[${stats.post}]]</span>
            <span>文章数</span>
          </div>
          <div class="item" th:title="'累计评论数 '+${stats.comment}">
            <span class="num">[[${stats.comment}]]</span>
            <span>评论数</span>
          </div>
        </th:block>
        <th:block th:if="${theme.config.blogger.overview_type == 'D'}">
          <th:block th:with="tags = ${tagFinder.listAll()}">
            <div class="item" th:with="tagNum = ${#lists.size(tags)}" th:title="'累计标签数 '+${tagNum}">
              <span class="num">[[${tagNum}]]</span>
              <span>标签数</span>
            </div>
          </th:block>

          <div class="item" th:title="'累计文章数 '+${stats.post}">
            <span class="num">[[${stats.post}]]</span>
            <span>文章数</span>
          </div>
          <div class="item" th:title="'累计评论数 '+${stats.comment}">
            <span class="num">[[${stats.comment}]]</span>
            <span>评论数</span>
          </div>
        </th:block>
      </div>
      <th:block th:if="${theme.config.blogger.enable_weather and theme.config.blogger.weather_key != ''}">
        <div id="he-plugin-simple"></div>
      </th:block>
      <th:block th:if="${theme.config.blogger.enable_social} and ${not #lists.isEmpty(theme.config.blogger.socials)}">
        <div class="social-account">
          <th:block th:each="socials : ${theme.config.blogger.socials}">
            <th:block th:replace="~{modules/macro/social :: ${socials.socials_select}}" />
          </th:block>
        </div>
      </th:block>
      <th:block th:if="${theme.config.blogger.enable_icp} and ${not #lists.isEmpty(theme.config.blogger.icp)}">
        <div class="icp">
          <a class="link" target="_blank" href="https://beian.miit.gov.cn/">
            [[${theme.config.blogger.icp}]]
          </a>
        </div>
      </th:block>
      <th:block th:if="${theme.config.blogger.enable_strips}">
        <canvas id="canvas-strips" width="300" height="340"></canvas>
        <script th:src="@{/assets/effect/bg/strips.js}"></script>
      </th:block>
    </section>
  </th:block>
</html>
